home *** CD-ROM | disk | FTP | other *** search
- #pragma once
- //
- // class dotcollection is used for the rapid appliance of first order optic
- // flow. It simply stores a collection of 2D dot positions at 32-bit resolution.
- //
- class dotcollection
- {
- public:
-
- dotcollection( int aantaldots);
-
- ~dotcollection();
-
- protected:
- unsigned int numdots;
- //
- // coordinates of the dots:
- //
- short *xcoords;
- short *ycoords;
-
- private:
- //
- // we use 'short_long_hack' to split an unsigned long in two
- // signed shorts (the unsigned long being returned by randomizer_step())
- //
- typedef struct two_shorts
- {
- short left;
- short right;
- };
-
- typedef union short_long_hack
- {
- two_shorts shorties;
- unsigned long ulong;
- };
- };
-